<?php
namespace app\index\validate;
use think\Validate;
class Admin extends Validate
{

    protected $rule=[
        'name'=>'max:25',
        'password'=>'require'
        // 'newpassword'=>'confirm:password',
    ];

    protected $message=[
        'name.max'=>'用户名称最多20字！',
        'password.require'=>'用户密码不得为空！',
        // 'password.min'=>'密码不得少于6为！',
        // 'password.confirm'=>'新旧密码不一致',
        
    ];

    protected $scene=[
        'add'=>['name','password'],
        'edit'=>['name','password'=>'min:6'],
    ];

}
